package com.ikas.ai.consts;

/**
 * 常用变量
 *
 * @author HXH
 */
public interface Consts {

    String CHART_SET = "UTF-8";

    String CONTENT_TYPE = "application/json;charset=UTF-8";

    String JSON_RESULT_CODE = "code";
    String JSON_RESULT_DATA = "data";
    String JSON_RESULT_DESC = "desc";
    /**
     * redis-OK
     */
    String OK = "OK";

    /**
     * redis过期时间，以秒为单位，一天
     */
    int EXRP_DAY = 60 * 60 * 24;

    /**
     * redis-key-前缀-user:login:account
     * 存user
     */
    String PREFIX_USER_LOGIN = "user:login:";
    /**
     * JWT-account:
     */
    String ACCOUNT = "account";

    /**
     * 系统超级管理员
     */
    String ROOT = "admin";

    /**
     * token标志
     */
    String TOKEN = "token";

    /**
     * 验证码key前缀
     */
    String CAPTCHA_KEY = "captcha:";

    /**
     * 设置redis key 5分钟后失效
     */
    int CAPTCHA_KEY_TIMEOUT = 5 * 60;

    /**
     * token过期时间-7天失效
     */
    int TOKEN_EXPIRE_WEEK = 3600 * 24 * 7;

    /**
     * 文件访问路径前缀
     */
    String USER_UPLOAD_PATH_PREFIX = "/api/static";

    /**
     * 生产环境是否从cookie获取token  on:是 off：否
     */
    String ON = "on";

    /**
     * 后门验证码-线上环境需关掉
     */
    String IKAS_CODE = "ikas";

    /**
     * canal redis缓存前缀
     */
    String CANAL_CACHE_PREFIX = "canal:cache:";

    /**
     * 菜单权限-redis缓存前缀
     */
    String MENU_CACHE_PREFIX = "menu:cache:";

    /**
     * 操作权限-redis缓存前缀
     */
    String PERM_CACHE_PREFIX = "permission:cache:";

    /**
     * 设备数据上报状态标志
     */
    String DEVICE_STATE_PREFIX = "device:state:";
    /**
     * echarts缓存标志
     */
    String ECHART_CACHE_PREFIX = "echart:cache:";

    /***
     *  redis更新字段
     */
    String UPDATE_COLOUM = "id";

    /***
     *  分页当前页
     */
    String PAGE = "page";

    /***
     *  分页每页显示条数
     */
    String SIZE = "size";

    /**
     * 登录错误次数key
     */
    String LOGIN_FAIL = "failcount";

    /**
     * 登录出现错误次数-出现验证码
     */
    int LOGIN_FAIL_NUM = 3;

    /**
     * 数据集导入三种方式
     */
    String FILE = "file";
    String DB = "db";
    String HTTP = "http";

    /**
     * echarts图表分类
     */
    String LINE = "line";
    //柱状图
    String BAR = "bar";
    //饼图
    String PIE = "pie";
    //散点图
    String SCATTER = "scatter";


    String VALID_METE_VALUE = "1";

    String PID = "0";

    String STATION_NAME = "清远抽水蓄能电厂";

    String STATION_NO = "QX";
    String EXCEPTION_MSG = "响应时长过长";

    String REGEX = "^[1-9]\\d*$";
}

